package com.apes.crm.vip.masterdata.service;

import com.alibaba.fastjson.JSONObject;
import com.apes.framework.api.DomainService;
import com.apes.framework.plugin.esb.api.SimpleRequest;
import com.apes.framework.util.MapUtil;
import org.springframework.stereotype.Service;

/**
 * @program: apes-server
 * @description
 * @author: czs
 * @create: 2021-04-12 10:51
 **/
@Service("syncService")
public class SyncService extends DomainService {
    public void forApp(SimpleRequest re){
        JSONObject jo = re.getJO();
        String method =jo.getString("method");

        if(method.equals("v1/common-option?theme=vendor.user.level")){
            this.invoke("vip.vipGrade.toSave", MapUtil.mapper("method",method));

        }else if(method.equals("v1/common-option?theme=user.userRole.list")){
            this.invoke("vip.vipIdentity.toSave",MapUtil.mapper("method",method));
        }

    }

}
